<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<link rel="icon" href="assets/images/logo/Shop.ico">

<body>
<!-- Blog Section Start -->
<!--<div class="section section-margin">-->
<!--    <div class="container">-->
<!--        <div class="row">-->
<!-- Sidebar Widget Start -->
<aside class="sidebar_widget mt-10 mt-lg-0" th:fragment="rightPage">
    <div class="widget_inner" data-aos="fade-up" data-aos-delay="200">
        <div class="widget-list pb-10">
            <h3 class="widget-title mb-6">搜索</h3>
            <form class="search-box" method="get" th:action="@{blog/blog-right-sidebar}">
                <input type="text" class="form-control" placeholder="搜索你喜欢的" aria-label="Search Our Store" name="name">
                <button class="btn btn-primary btn-hover-secondary" type="submit">
                    <i class="fa fa-search"></i>
                </button>
            </form>
        </div>
        <div class="widget-list pb-10">
            <h3 class="widget-title mb-6">博客相关分类</h3>
            <!-- Widget Menu Start -->
            <nav>
                <ul class="category-menu mb-n3">
                    <li class="menu-item-has-children pb-4" th:each="article : ${cmsTopicCategoryList}">
                        <a th:href="@{/blog/selectByCategoryId(categoryId=${article.id})}" th:text="${article.name}">
                            <i class="fa fa-angle-down"></i></a>
                    </li>
                </ul>
            </nav>
            <!-- Widget Menu End -->
        </div>
        <div class="widget-list pb-10">
            <h3 class="widget-title mb-6">最近发布</h3>
            <div class="sidebar-body blog-list-wrapper mb-n6">

                <!-- Single Blog List Start -->
                <div class="single-blog-list mb-6" th:each="cms:${createTimeList}" th:onclick="('javascript:newTime('+${cms.id}+')')">
                    <!-- Blog List Thumb Start -->
                    <div class="blog-thumb">
                        <a th:href="@{/blog/selectTopic/}+${cms.id}" class="image">
                            <img class="fit-image" th:src="${cms.awardName}"
                                 alt="Product Image">
                        </a>
                    </div>
                    <!-- Blog List Thumb End -->

                    <!-- Blog List Content Start -->
                    <div class="blog-list-content">
                        <h6 class="blog-name">
                            <a th:href="@{/blog/selectTopic/}+${cms.id}"><span th:text="${cms.name}"></span></a>
                        </h6>
                        <div class="blog-meta">
                            <p><span class="meta-item date" th:text="${#dates.format(cms.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span></p>
                        </div>
                    </div>
                    <!-- Blog List Content End -->
                </div>
                <!-- Single Blog List End -->
            </div>
        </div>
        <div class="widget-list pb-10">
            <h3 class="widget-title mb-6">历史浏览</h3>
            <div class="sidebar-body sidebar-body-archive">
                <ul class="archive-list d-block ms-3">
                    <li th:each="article : ${timeList}" th:onclick="('javascript:newTime('+${article.id}+')')">
                        <a th:href="@{/blog/selectTopic/}+${article.id}" th:text="${article.name}"/>
                        <p th:text="${#dates.format(article.lookTime, 'yyyy-MM-dd HH:mm:ss')}">
                    </li>
                </ul>
            </div>
        </div>
    </div>
</aside>
<!-- Sidebar Widget End -->
<!--            </div>-->
<!-- Blog Section End -->
</body>

<!-- Vendor JS -->

<script src="../static/js/vendor/popper.min.js"></script>
<script src="assets/js/vendor/bootstrap.min.js"></script>
<script src="assets/js/vendor/jquery-3.5.1.min.js"></script>
<script src="assets/js/vendor/jquery-migrate-3.3.0.min.js"></script>
<script src="assets/js/vendor/modernizr-3.11.2.min.js"></script>


<!-- Plugins JS -->

<script src="assets/js/plugins/aos.min.js"></script>
<script src="assets/js/plugins/jquery.ajaxchimp.min.js"></script>
<script src="assets/js/plugins/jquery-ui.min.js"></script>
<script src="assets/js/plugins/nice-select.min.js"></script>
<script src="assets/js/plugins/swiper-bundle.min.js"></script>
<script src="assets/js/plugins/countdown.min.js"></script>
<script src="assets/js/plugins/lightgallery-all.min.js"></script>


<!-- Use the minified version files listed below for better performance and remove the files listed above -->


<script src="assets/js/vendor.min.js"></script>
<script src="assets/js/plugins.min.js"></script>
<script>
    function newTime(id) {
        console.info(id)
        $.get("CreateLookTime",{id},function (result) {

        })
    }
</script>
<!--Main JS-->
<script src="assets/js/main.js"></script>
</body>

</html>